import React, { memo } from "react";
import PropTypes from "prop-types";

import "./index.scss";

const WYThemeHeaderRCM = memo(function (props) {
  const { title, keywords } = props;
  return (
    <div className="theme-header-rcm sprite_02">
      <div className="left">
        <h3 className="title">{title}</h3>
        <div className="keyword">
          {keywords.length>0 && keywords.map((item, index) => (
            <div className="item" key={index}>
              <a href="todo">{item}</a>
              <span className="divider">|</span>
            </div>
          ))}
        </div>
      </div>
      <div className="right">
        <a href="todo">更多</a>
        <i className="icon sprite_02"></i>
      </div>
    </div>
  );
});
WYThemeHeaderRCM.propTypes ={
    title: PropTypes.string.isRequired,
    keywords: PropTypes.array
}
WYThemeHeaderRCM.defaultProps = {
    keywords: []
  }

export default WYThemeHeaderRCM;
